<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>

        //js定义对象,[]数组 {}对象
        let user = {
            name: 'zyw',
            age: 22,
            show: function(){
                console.log(this.name,this.age)
            }
        }

        //访问对象的信息
        console.log(user.name,user.age)
        user.show()

        let userArr = [
            user,user,user
        ]

        for(u of userArr){
            console.log(u.name,u.age)
        }

    </script>

</head>

<body>

</body>
</html>
